package com.greydawn.StatePattern;

import java.lang.invoke.ConstantCallSite;

/**
 * @Author: zhongwr
 * @Create: 2021/12/18 15:53
 * @Version 1.0
 * @Description: 上下文类，状态推动作用
 */
public class Context {

    public Status status;

    public Context(Status status) {
        this.status = status;
    }

    public void request() {
        System.out.println("当前状态" + this.status.getStatusStr() + ",开始执行当前状态流程");
        status.doSomething(this);
    }

}
